#include "Frm03.h"

Frm03::Frm03(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm03::~Frm03() {
}

void Frm03::onInit() {

}

void Frm03::createParts() {
	setMainArg(0, 0, 1024, 600);
	setMainStyle(0, 0xffffff, 0xffffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- Button : wMButton1                   -----------------------------*/
	wMButton1 = new STTButton(p_rt, this, "wMButton1", 0);
	wMButton1->setMainArg(13, 1, 98, 48, false);
	wMButton1->setPressedArg("adi", 0x0, "文泉驿微米黑", 16, 0);
	wMButton1->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->setReleasedArg("adi", 0x0, "文泉驿微米黑", 12, 0);
	wMButton1->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->bindOpenFormHandler(Event::CLICKED, "Frm01", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton3                   -----------------------------*/
	wMButton3 = new STTButton(p_rt, this, "wMButton3", 0);
	wMButton3->setMainArg(113, 1, 98, 48, false);
	wMButton3->setPressedArg("adi assist", 0x0, "文泉驿微米黑", 16, 0);
	wMButton3->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton3->setReleasedArg("adi assist", 0x0, "文泉驿微米黑", 12, 0);
	wMButton3->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton3->bindOpenFormHandler(Event::CLICKED, "Frm02", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton4                   -----------------------------*/
	wMButton4 = new STTButton(p_rt, this, "wMButton4", 0);
	wMButton4->setMainArg(213, 1, 98, 48, false);
	wMButton4->setPressedArg("圆盘动画", 0x0, "文泉驿微米黑", 16, 0);
	wMButton4->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton4->setReleasedArg("圆盘动画", 0x0, "文泉驿微米黑", 12, 0);
	wMButton4->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton4->bindOpenFormHandler(Event::CLICKED, "Frm04", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton5                   -----------------------------*/
	wMButton5 = new STTButton(p_rt, this, "wMButton5", 0);
	wMButton5->setMainArg(313, 1, 98, 48, false);
	wMButton5->setPressedArg("心跳动画", 0x0, "文泉驿微米黑", 16, 0);
	wMButton5->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton5->setReleasedArg("心跳动画", 0x0, "文泉驿微米黑", 12, 0);
	wMButton5->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton5->bindOpenFormHandler(Event::CLICKED, "Frm05", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton6                   -----------------------------*/
	wMButton6 = new STTButton(p_rt, this, "wMButton6", 0);
	wMButton6->setMainArg(413, 1, 98, 48, false);
	wMButton6->setPressedArg("雷达动画", 0x0, "文泉驿微米黑", 16, 0);
	wMButton6->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton6->setReleasedArg("雷达动画", 0x0, "文泉驿微米黑", 12, 0);
	wMButton6->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton6->bindOpenFormHandler(Event::CLICKED, "Frm06", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton7                   -----------------------------*/
	wMButton7 = new STTButton(p_rt, this, "wMButton7", 0);
	wMButton7->setMainArg(513, 1, 98, 48, false);
	wMButton7->setPressedArg("文字阴影", 0x0, "文泉驿微米黑", 16, 0);
	wMButton7->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton7->setReleasedArg("文字阴影", 0x0, "文泉驿微米黑", 12, 0);
	wMButton7->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton7->bindOpenFormHandler(Event::CLICKED, "Frm07", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton8                   -----------------------------*/
	wMButton8 = new STTButton(p_rt, this, "wMButton8", 0);
	wMButton8->setMainArg(613, 1, 98, 48, false);
	wMButton8->setPressedArg("整页飞入", 0x0, "文泉驿微米黑", 16, 0);
	wMButton8->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton8->setReleasedArg("整页飞入", 0x0, "文泉驿微米黑", 12, 0);
	wMButton8->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton8->bindOpenFormHandler(Event::CLICKED, "Frm08", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton9                   -----------------------------*/
	wMButton9 = new STTButton(p_rt, this, "wMButton9", 0);
	wMButton9->setMainArg(713, 1, 98, 48, false);
	wMButton9->setPressedArg("局部飞入", 0x0, "文泉驿微米黑", 16, 0);
	wMButton9->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton9->setReleasedArg("局部飞入", 0x0, "文泉驿微米黑", 12, 0);
	wMButton9->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton9->bindOpenFormHandler(Event::CLICKED, "Frm09", PageMode::NEWWIN, NULL);

	/*----------------------------- Button : wMButton10                  -----------------------------*/
	wMButton10 = new STTButton(p_rt, this, "wMButton10", 0);
	wMButton10->setMainArg(813, 1, 98, 48, false);
	wMButton10->setPressedArg("adi", 0x0, "文泉驿微米黑", 16, 0);
	wMButton10->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton10->setReleasedArg("adi", 0x0, "文泉驿微米黑", 12, 0);
	wMButton10->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);

	/*----------------------------- Button : wMButton11                  -----------------------------*/
	wMButton11 = new STTButton(p_rt, this, "wMButton11", 0);
	wMButton11->setMainArg(913, 1, 98, 48, false);
	wMButton11->setPressedArg("adi", 0x0, "文泉驿微米黑", 16, 0);
	wMButton11->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton11->setReleasedArg("adi", 0x0, "文泉驿微米黑", 12, 0);
	wMButton11->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);

	/*----------------------------- Label : wMLabel2                     -----------------------------*/
	wMLabel2 = new STTLabel(p_rt, this, "wMLabel2");
	wMLabel2->setMainArg(280, 231, 464, 134, "鑫通态APUS IDE示例程序", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel2->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel2->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel2->setFormatText(TextAlign::CENTER, LabelLongMode::CLIP, 30);

	/*----------------------------- Label : wMLabel3                     -----------------------------*/
	wMLabel3 = new STTLabel(p_rt, this, "wMLabel3");
	wMLabel3->setMainArg(47, 364, 930, 134, "#ff0000 动画##0000ff 效果#演示", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel3->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel3->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel3->setFormatText(TextAlign::CENTER, LabelLongMode::CLIP, 30);

	/*----------------------------- Label : wMLabel4                     -----------------------------*/
	wMLabel4 = new STTLabel(p_rt, this, "wMLabel4");
	wMLabel4->setMainArg(323, 511, 378, 88, "", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel4->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel4->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel4->setFormatDate("-", ":", true, true, true, true, true, true, true);
	wMLabel4->bindData(_V("$time"));

	/*called after widget created.*/

	return; //createParts END
}

void Frm03::onLoad() {
	wMLabel3->setRecolor(true);
}

bool Frm03::onClosing() {
	return true;
}

void Frm03::onDispose() {

}

